#ifndef  _PANDAX_ANIMATIONDATA_H__
#define  _PANDAX_ANIMATIONDATA_H__
typedef struct _px_rectangle
{
	int x; 
	int y;
	int width;
	int height;
}PXRectangle;
typedef struct _px_module
{
	int id;
	int image_id;
	PXRectangle module_rect;
}PXModule;

typedef struct _px_module_inframe
{
    int moduleId;
	int x;
	int y;
}PXMoudleInFrame;

typedef struct _px_frame
{
	int id;
	PXMoudleInFrame * modules;
	short module_len;
	PXRectangle * attack_rects;
	short attack_rects_len;
}PXFrame;


typedef struct _px_frame_inaction
{
	int frameId;
	int x;
	int y;
	int delay;
}PXFrameInAction;

typedef struct _px_action
{
	int id;
	PXFrameInAction * frames;
	short frame_len;
}PXAction;

typedef struct _px_ani_image
{
	char    * image_names;
	int id;
}PXAniImage;
typedef struct _px_animationData
{
	PXAniImage  * images;
	short  image_count;
	PXModule * modules;
	PXFrame  * frames;
	PXAction * actions;
}PXAnimationData;
PXAnimationData * load_animation(const char * fileName);

#endif // px_animationdata_h__
